package com.example.enums;

import lombok.Getter;

@Getter
public enum RoleEnum {
    ADMIN("admin", "管理员"),
    USER("user", "用户"),
    SUDO("sudo", "超级管理员");
    private final String role;
    private final String label;

    RoleEnum(String role, String label) {
        this.role = role;
        this.label = label;
    }

    public static boolean validate(String roleName) {
        return ADMIN.name().equals(roleName) || USER.name().equals(roleName);
    }
}
